import http from "./http";

export default {
  StudentLogin(params) {
    return http.post(`/Login/StudentLogin`, params);
  },
  TeacherLogin(params) {
    return http.post(`/Login/TeacherLogin`, params);
  },

  //获取学生信息
  GetStudentData(params){
    return http.get('/StudentGeneralInfo/GetStudentInfo',params);
  },

  //更新学生数据
  UpdateStudentInfo(params){
    return http.put('/StudentGeneralInfo/UpdateStudentInfo',params);
  },

  //获取测试数据
  GetExercise(params) {
    return http.get(`/StudentGeneralInfo/GetExercise`, params);
  },
  //实习小组类别
  GetCategory(params) {
    return http.get(`/StudentGeneralInfo/GetCategory`, params);
  },
  //实习小组数据
  StudentGetGroup(params) {
    return http.get(`/StudentGeneralInfo/GetGroup`, params);
  },
  //实习小组数据ById
  StudentGetGroupById(params) {
    return http.get(`/StudentGeneralInfo/GetGroupByCategoryID`, params);
  },
  //申请实习小组
  ApplyGroup(params) {
    return http.post(`/StudentGeneralInfo/ApplyGroup`, params);
  },
  //实习小组info 测试
  GetUserGroupAndExercise(params) {
    return http.get(`/StudentGeneralInfo/GetUserGroupAndExercise`, params);
  },
  //通过测试id获取测试题目
  StudentGetTopicsByExerciseID(params) {
    return http.get(`/StudentGeneralInfo/GetTopicsByExerciseID`, params);
  },

  ///////////////////////


  //获取老师信息
  GetTeacherData(params){
    return http.get('/TeacherGeneralInfo/GetTeacherInfo',params);
  },

  //更新老师数据
  UpdateTeacherInfo(params){
    return http.put('/TeacherGeneralInfo/UpdateTeacherInfo',params);
  },
  //通过组id获取所有测试
  GetExercises(params) {
    return http.get(`/TeacherGeneralInfo/GetExercises`, params);
  },
  //添加/更新测试题目
  IssueExercise(params) {
    return http.post(`/TeacherGeneralInfo/IssueExercise`, params);
  },
  //发布测试
  PublishExercise(params) {
    return http.post(`/TeacherGeneralInfo/PublishExercise`, params);
  },
  //通过测试id删除测试
  DeleteExerciseByID(params) {
    return http.delete(`/TeacherGeneralInfo/DeleteExerciseByID`, params);
  },
  //获取实习小组
  TeacherGetGroup(params) {
    return http.get(`/TeacherGeneralInfo/GetGroup`, params);
  },
  //通过测试id获取测试题目
  TeacherGetTopicsByExerciseID(params) {
    return http.get(`/TeacherGeneralInfo/GetTopicsByExerciseID`, params);
  },
};
